negotiator.issue
Class Issue

java.lang.Object
  extended by negotiator.issue.Objective
      extended by negotiator.issue.Issue
All Implemented Interfaces:
javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Direct Known Subclasses:
IssueDiscrete, IssueInteger

public abstract class Issue
extends Objective

Class Issue represents a negotiation issue to be settled in a negotiation. Issues in a domain are identified by unique index field.

Author:
Tim Baarslag & Dmytro Tykhonov

Constructor Summary
Issue(java.lang.String name, int issueNumber)
          Creates a new issue give its name and number.
Issue(java.lang.String name, int issueNumber, Objective parent)
          Creates a new issue give its name, number, and parent.
 
Method Summary
 void addChild(Objective newObjective)
          Overrides addChild from Objective to do nothing, since Issues can't have children.
abstract  boolean checkInRange(Value value)
          Method to check if the given value is in the range specified by the issue.
abstract  java.lang.String convertToString()
           
abstract  ISSUETYPE getType()
          This method is added for convenience.
 negotiator.xml.SimpleElement toXML()
          Returns a SimpleElement representation of this issue.
 
Methods inherited from class negotiator.issue.Objective
children, equalContents, equals, getAllowsChildren, getChildAt, getChildCount, getChildren, getChildWithID, getDescription, getHighestObjectiveNr, getIndex, getName, getNumber, getObjective, getParent, getPath, getPreorderEnumeration, getPreorderIssueEnumeration, getPreorderObjectiveEnumeration, getSiblings, getUserObject, hashCode, insert, isIssue, isLeaf, isObjective, isParent, remove, remove, removeFromParent, setDescription, setName, setNumber, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Issue

public Issue(java.lang.String name,
             int issueNumber)
Creates a new issue give its name and number.

Parameters:
name - of the issue.
issueNumber - unique ID of the issue.

Issue

public Issue(java.lang.String name,
             int issueNumber,
             Objective parent)
Creates a new issue give its name, number, and parent.

Parameters:
name - of the issue.
issueNumber - uniqueID of the issue.
parent - objective of the issue.
Method Detail

getType

public abstract ISSUETYPE getType()
Description copied from class: Objective
This method is added for convenience. It is simply an alternative implementation of the getType method from the Issue class. It will always return that the type is Objective. This method must be overridden in Issue to return the type of the Issue.

Overrides:
getType in class Objective
Returns:
ISSUETYPE.OBJECTIVE

convertToString

public abstract java.lang.String convertToString()
Returns:
corresponding string representation

checkInRange

public abstract boolean checkInRange(Value value)
Method to check if the given value is in the range specified by the issue.

Parameters:
value - to be checked.
Returns:
true if in range.

addChild

public void addChild(Objective newObjective)
Overrides addChild from Objective to do nothing, since Issues can't have children. This method simply returns without doing anything.

Overrides:
addChild in class Objective
Parameters:
newObjective - gets negated.

toXML

public negotiator.xml.SimpleElement toXML()
Returns a SimpleElement representation of this issue.

Overrides:
toXML in class Objective
Returns:
The SimpleElement with this issues name and index.